<?php
namespace Admin\Controller;
use Think\Controller;
class TestController extends BaseController
{
    public function lst()
    {
    	$model = M('test');
    	$data = $model->select();
    	$this->assign(array(
    		'data' => $data,
    	));

		// 设置页面中的信息
		$this->assign(array(
			'_page_title' => '申请列表',
		));
    	$this->display();
    }
    public function delete()
    {
        $model = D('test');
        if($model->delete(I('get.id', 0)) !== FALSE)
        {
            $this->success('删除成功！', U('lst', array('p' => I('get.p', 1))));
            exit;
        }
        else
        {
            $this->error($model->getError());
        }
    }
}